/**
 * 
 */
package com.vector.ding.web.controller;

import net.sf.json.JSONObject;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.vector.ding.web.service.UserService;

/**
 * @author 丁窍
 *
 */
@Controller
public class HelloController {
	
	@Autowired
	private UserService userService;
	
	@ResponseBody
	@RequestMapping("/hello.do")
	public String sayHello() {
		String str = "丁窍，你好! wellcom.";
		return str;
	}
	
	@ResponseBody
	@RequestMapping("/json.do")
	public JSONObject sayHelloJson() {
		String str = "丁窍，你好! wellcom.";
		JSONObject json = new JSONObject();
		json.put("name", str);
		return json;
	}
	
	@ResponseBody
	@RequestMapping("/getUserList.do")
	public Object getUserList() {
		return userService.getUserList();
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
